package practica1;

public class Funcion3 extends FuncionUnaVar{

	public Funcion3(int min, int max, double p) {
		super(min, max, p);	
		maximo = -201.843;
	}

	public boolean maximoAprox(double x){
		double suelo, techo;
		suelo = maximo - 0.001;
		techo = maximo + 0.001;
		return suelo <= x && x <= techo;
	}
	
	public double calcAptitud(double[] f) {
		double x = f[0];
		return - Math.abs(x*Math.sin(Math.sqrt(Math.abs(x))));
	}

}
